package com.zte.claa.inficombo.csa.app.model.dev;

import java.sql.Timestamp;

import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 设备扩展配置（主要针对自研设备，扩展配置属性信息）
 * 
 * @author 0283000115
 *
 */
public class DevCmdConfData {
	//时间日期格式
	public static final String DATETIME_FORMAT = "yyyy-MM-dd HH:mm:ss";
	//时间日期格式
	public static final String TIME_ZONE = "GMT+8";
	// 执行标记.
	public static final byte EXEC_FLAG_NO = 0;
	public static final byte EXEC_FLAG_YES = 1;
	// 启用状态
	public static final byte STATUS_UNACTIVE = 0;
	public static final byte STATUS_ACTIVE = 1;
	
	private String deveui;
	private String devname;   // 关联查询获取；
	private String cmdcode; 
	private String devtpid;
	private String devtpname; // 关联查询获取；
	private String projectid;
	private int devport = 0;
	// 0--未执行；1--已执行；
	private byte execflag = EXEC_FLAG_NO;
	// status： 0--未启用；1--已启用；
	private byte status = STATUS_ACTIVE;
	
	@JsonFormat(pattern=DATETIME_FORMAT, timezone = TIME_ZONE)
	private Timestamp exectime; 
	private String datajson;
	
	public DevCmdConfData(){
		
	}

	public String getDeveui() {
		return deveui;
	}

	public void setDeveui(String deveui) {
		this.deveui = deveui;
	}

	public String getDevtpid() {
		return devtpid;
	}

	public void setDevtpid(String devtpid) {
		this.devtpid = devtpid;
	}

	public String getProjectid() {
		return projectid;
	}

	public void setProjectid(String projectid) {
		this.projectid = projectid;
	}

	public String getDatajson() {
		return datajson;
	}

	public void setDatajson(String datajson) {
		this.datajson = datajson;
	}

	public String getDevname() {
		return devname;
	}

	public void setDevname(String devname) {
		this.devname = devname;
	}

	public String getCmdcode() {
		return cmdcode;
	}

	public void setCmdcode(String cmdcode) {
		this.cmdcode = cmdcode;
	}

	public String getDevtpname() {
		return devtpname;
	}

	public void setDevtpname(String devtpname) {
		this.devtpname = devtpname;
	}

	public byte getExecflag() {
		return execflag;
	}

	public void setExecflag(byte execflag) {
		this.execflag = execflag;
	}

	public Timestamp getExectime() {
		return exectime;
	}

	public void setExectime(Timestamp exectime) {
		this.exectime = exectime;
	}

	public int getDevport() {
		return devport;
	}

	public void setDevport(int devport) {
		this.devport = devport;
	}
	
	public byte getStatus() {
		return status;
	}

	public void setStatus(byte status) {
		this.status = status;
	}

	public String toString(){
		StringBuffer sb = new StringBuffer();
		sb.append("deveui=").append(this.deveui).append(", ");
		sb.append("devname=").append(this.devname).append(", ");
		sb.append("cmdcode=").append(this.cmdcode).append(", ");
		sb.append("devtpid=").append(this.devtpid).append(", ");
		sb.append("devtpname=").append(this.devtpname).append(", ");
		sb.append("projectid=").append(this.projectid).append(", ");
		sb.append("status=").append(this.status).append(", ");
		sb.append("excflag=").append(this.execflag).append(", ");
		sb.append("exctime=").append(this.exectime).append(", ");
		sb.append("devport=").append(this.devport).append(", ");		
		sb.append("datajson=").append(this.datajson);
		return sb.toString();
	}
}
